// pages/shouye/paymentorder/paymentorder.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    //  choose:false,
     choose1:true,
     price:'',
     orderId:'',
     typeshop:''
  },
  paysuccess: function () {
    var price = this.data.price;
    var orderId = this.data.orderId;
    var typeshop = this.data.typeshop;
    if(typeshop == 1){
      wx.navigateTo({
        url: '../inviteorder/inviteorder?price=' + price + '&orderId=' + orderId,
        success: function (res) { },
        fail: function (res) { },
        complete: function (res) { },
      })
    }
    if(typeshop == 2){
      wx.navigateTo({
        url: '../paysuccess/paysuccess?price=' + price + '&orderId=' + orderId,
        success: function (res) { },
        fail: function (res) { },
        complete: function (res) { },
      })
    }
   
  },
  // choose:function(){
  //    var that= this;
  //    that.setData({
  //       choose:true,
  //       choose1:true
  //    })
  // },
  // choose1: function () {
  //   var that = this;
  //   that.setData({
  //     choose: false,
  //     choose1: true
  //   })
  // },
  choose2: function () {
    var that = this;
    that.setData({
      // choose: false,
      choose1: false
    })
  },
  choose3: function () {
    var that = this;
    that.setData({
      // choose: false,
      choose1: true
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var orderId = options.orderId;
    var price = options.price;
    var typeshop = options.typeshop;
    console.log(typeshop);
    console.log(orderId);
    console.log(price);
    this.setData({
      orderId: orderId,
      price:price,
      typeshop:typeshop
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})